const express = require('express')
const ejs = require('ejs')

const app = express()

app.engine('html', ejs.__express)
// 配置模板引擎
app.set("view engine", "html")


// 引入外部路由模块
const api = require('./routes/api')
const admin = require('./routes/admin')
const web = require('./routes/web')

// 挂在 外部路由 模块
app.use('/admin', admin)
app.use('/api', api)
app.use('/', web)

app.listen(3000)